public with sharing class QuestionsCustomize {

public Community mycom {get;set;}
public Question myquest {get;set;}
public list<Reply> myrep {get;set;}
    

    public QuestionsCustomize(ApexPages.StandardController stdController){  
        

        mycom = [SELECT Id FROM Community WHERE Name='*Customers Answers Community*'];
        myquest = [SELECT BestReplyId, Body, CommunityID, LastReplyDate, LastReplyId, NumReplies, Title FROM Question WHERE CommunityID=:mycom.Id];
        myrep = [SELECT Body, DownVotes, Name, QuestionId, UpVotes, VoteTotal, Id FROM Reply WHERE QuestionId=:myquest.Id ORDER BY Id Desc];

    
    }
    
    public void mySaveMethod(){
        update myquest;
        update myrep;
    }
}